<template>
    <div class="gift-list">
        <div v-for="gift in gifts" :key="gift.id" class="gift-item">
            <div class="gift-image">
                <img :src="gift.image" :alt="gift.title">
                <div class="collect-btn">
                    <i class="icon-heart"></i>
                    <span>收藏</span>
                </div>
            </div>
            <div class="gift-info">
                <h3 class="gift-title">{{ gift.title }}</h3>
                <div class="promotion-tag">好价再降{{ gift.coupon }}元</div>
                <div class="price-info">
                    <div class="current-price">
                        <span class="price-prefix">券后</span>
                        <span class="price-symbol">¥</span>
                        <span class="price-value">{{ gift.price }}</span>
                        <span class="original-price">¥{{ gift.originalPrice }}</span>
                    </div>
                    <div class="coupon-info">
                        <span class="coupon-tag">{{ gift.coupon }}元券</span>
                        <span class="commission">佣金{{ gift.commission }}</span>
                    </div>
                    <div class="earn-btn">
                        赚 ¥{{ gift.earn }}
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            gifts: [
                {
                    id: 1,
                    title: '欧力丝OLiSi女装假两件撞色拼接双层v领打底显瘦长袖针织衫上衣',
                    image: 'product-image.jpg',
                    price: '91.99',
                    originalPrice: '92.99',
                    coupon: '1',
                    commission: '16.8%',
                    earn: '15.45'
                }
            ]
        };
    }
};
</script>

<style scoped>
.gift-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.gift-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
}

.gift-image {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.gift-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.collect-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(0,0,0,0.6);
    border-radius: 15px;
    color: white;
    font-size: 13px;
    font-weight: 500;
}

.gift-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gift-title {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.promotion-tag {
    color: #f40;
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 500;
}

.price-info {
    margin-top: auto;
}

.current-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 6px;
}

.price-prefix {
    color: #f40;
    font-size: 13px;
    font-weight: 500;
}

.price-symbol {
    color: #f40;
    font-size: 15px;
    font-weight: 500;
}

.price-value {
    color: #f40;
    font-size: 22px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto;
}

.original-price {
    color: #999;
    font-size: 13px;
    text-decoration: line-through;
    margin-left: 6px;
}

.coupon-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.coupon-tag {
    color: #f40;
    font-size: 12px;
    padding: 2px 6px;
    border: 1px solid #f40;
    border-radius: 3px;
    font-weight: 500;
}

.commission {
    color: #666;
    font-size: 13px;
}

.earn-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #f40;
    color: white;
    font-size: 15px;
    font-weight: 500;
    border-radius: 4px;
    position: absolute;
    right: 12px;
    bottom: 12px;
}
</style> 